home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
273_01
/
getfsize.cc
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1988-01-09
|
357 b
|
16 lines
#include <dir.h>
long getfsize(char *fn)
/* Return the filesize of a file.
char *fn is a pointer to the filespec.
return = -1 if file is not found.
else returned will be the size of the file.
*/
{
struct ffblk fb;
int rc;
rc=findfirst(fn,&fb,0);
if(rc==0) return(fb.ff_fsize);
return(-1);
}